﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true"
    CodeBehind="Profile.aspx.cs" Inherits="Smart.Pages.Profile" %>

<asp:Content ID="HeaderContent" ContentPlaceHolderID="HeadContent" runat="server">
<script type="text/javascript">

    $(document).ready(function () {

        var $passwordContainer = $("#password-container");
        $passwordContainer.hide();

        $('input[type="checkbox"]').bind("click", function () {

            $("input", $passwordContainer).val("");

            if ($(this).is(":checked")) {
                $passwordContainer.show();
            }
            else {
                $passwordContainer.hide();
            }
        });
    });

</script>
</asp:Content>
<asp:Content ID="BodyContent" ContentPlaceHolderID="MainContent" runat="server">
    <h2>
        Update Profile
    </h2>
    <span class="failureNotification">
        <asp:Literal ID="ErrorMessage" runat="server"></asp:Literal>
    </span>
    <asp:ValidationSummary ID="UpdateUserValidationSummary" runat="server" CssClass="failureNotification"
        ValidationGroup="UpdateUserValidationGroup" />
    <div class="accountInfo">
        <fieldset class="register">
            <legend>Profile Information</legend>
            <p>
                <asp:Label ID="lblEmail" runat="server" AssociatedControlID="tbEmail" Text="Email:" />
                <asp:TextBox ID="tbEmail" runat="server" CssClass="textEntry" ReadOnly="true" />
            </p>
            <p>
                <asp:Label ID="lblFirstName" runat="server" AssociatedControlID="tbFirstName" Text="Име:" />
                <asp:TextBox ID="tbFirstName" runat="server" CssClass="textEntry" />
            </p>
            <p>
                <asp:Label ID="lblLastName" runat="server" AssociatedControlID="tbLastName" Text="Фамилия:" />
                <asp:TextBox ID="tbLastName" runat="server" CssClass="textEntry" />
            </p>
            <p>
                <asp:Label ID="lblPhone" runat="server" AssociatedControlID="tbPhone" Text="Телефон:" />
                <asp:TextBox ID="tbPhone" runat="server" CssClass="textEntry" />
            </p>
            <p class="change-password-checkbox-container">
                <asp:CheckBox ID="cboxChangePassword" runat="server" Text="Смени парола" Checked="false" />
            </p>
            <div id="password-container">
                <p>
                <asp:Label ID="lblPassword" runat="server" AssociatedControlID="tbPassword" Text="Нова парола:" />
                <asp:TextBox ID="tbPassword" runat="server" CssClass="passwordEntry" TextMode="Password" />
            </p>
            <p>
                <asp:Label ID="lblConfirmPassword" runat="server" AssociatedControlID="tbConfirmPassword"
                    Text="Потвърди парола:" />
                <asp:TextBox ID="tbConfirmPassword" runat="server" CssClass="passwordEntry" TextMode="Password" />
                <asp:CompareValidator ID="PasswordCompare" runat="server" ControlToCompare="tbPassword"
                    ControlToValidate="tbConfirmPassword" CssClass="failureNotification" Display="Dynamic"
                    ErrorMessage="The Password and Confirmation Password must match." ValidationGroup="UpdateUserValidationGroup"
                    Text="*" />
            </p>
            </div>
        </fieldset>
        <p class="submitButton">
            <asp:Button ID="UpdateUserButton" runat="server" CommandName="MoveNext" Text="Запази"
                ValidationGroup="UpdateUserValidationGroup" OnClick="UpdateUserButton_Click" />
        </p>
    </div>
</asp:Content>
